/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* smallerNumbersThanCurrent(int* nums, int numsSize, int* returnSize) {
    int i=0;
    int j=0;
    int arr[10000]={0};
    int *pa=(int*)malloc(numsSize*sizeof(int));
    for(i=0;i<numsSize;i++)
    {
        arr[i]=nums[i];
    }
    for(i=0;i<numsSize;i++)
    {
        int count=0;
        for(j=0;j<=numsSize-1;j++)
        {
            if((nums[i]>nums[j])&&nums[i]!=nums[j])
            count++;
        }
    pa[i]=count;
    }  
    *returnSize=numsSize;
    return pa;
}
